package cn.iocoder.springboot.lab12.mybatis.dataobject;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 用户 DO
 */
@TableName(value = "user1")
public class UserDO {

    /**
     * 用户编号
     */
    private Integer id;
    /**
     * 账号
     */
    private String name;

    @DateTimeFormat(pattern = "yyyy-MM-ddTHH:mm:ss")
    private Date createTime;

    @TableField(typeHandler = FastjsonTypeHandler.class)
    private JSONObject other;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public JSONObject getOther() {
        return other;
    }

    public void setOther(JSONObject other) {
        this.other = other;
    }
}
